from manim import *
from numpy import flip, insert

LV,QL,QH,JH='#75cfb8','#bbdfc8','#f0e5d8','#ffc478'

class p1(MovingCameraScene):
    def construct(self):
        # self.add(NumberPlane())
        # self.camera.frame.scale(1.1)
        square=Square(1).set_fill(JH,1)
        t=0.5
        a,b,c,d=[-t,t,0],[t,t,0],[t,-t,0],[-t,-t,0]
        tri=Polygon(ORIGIN,[3,0,0],[0,4,0]).set_fill(RED,1).next_to(c,UR,buff=0)
        for i in range(4):
            self.add(
                tri.copy().rotate_about_origin(PI/2*i),
                Text('朱实').move_to(Square().shift(RIGHT*1.5+UP).copy().rotate_about_origin(PI/2*i).scale(0.1).get_center())
            )
        self.add(square,Text('实'),
            MathTex('a').next_to(tri,DOWN),
            MathTex('b').next_to(tri,LEFT),
            MathTex('c').next_to(tri,UR,buff=-1.6)
        )
        self.wait()